﻿<%@ Page Language="vb" AutoEventWireup="false" Inherits="SendSMS.WebForm1"  CodeBehind="~/WebForm1.aspx.vb" %>

<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    
    <link href="Css/block.css" rel="stylesheet" type="text/css" />
    <link href="Css/webform1.css" rel="stylesheet" type="text/css" />
    
    <%--<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/reset-fonts-grids/reset-fonts-grids.css" />--%>

    <link href="Css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="http://code.jquery.com/jquery-1.5.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.blockUI.js" type="text/javascript"></script>
    <%--<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>--%>
    <script src="Scripts/jquery.pagination.js" type="text/javascript"></script>
    <%--<script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script>--%>

<%--    <script src="Scripts/jquery.autocomplete.min.js" type="text/javascript"></script>--%>
    
    <script src="Scripts/IgnouRobot.js" type="text/javascript"></script>

</head>

<body>

    <form id="form1" runat="server">
<div id="divRobotRunningStatusContainer">
    <a href="#" onclick="getRobotRunningStatus();return false;">Refresh Status</a>
    
    <div id="divRobotRunningStatus"></div></div>
    
    <div id="divList">
    <div id="divResult"></div>
    <div id="divItemsPgr"></div>
    </div>
<input type="text" id="txtEnr" value="" />
<a href="#" onclick="addEnroll();return false" >Add</a>

<br />
    <textarea id="txtEnrCSVList" cols="20" rows="2"></textarea>
    <a href="#" onclick="addEnrollCSVList();return false" >Add CSV</a>


<br />
    <textarea id="txtECCodeCSVList" cols="20" rows="2"></textarea>
    <a href="#" onclick="addECCodeCSVList();return false" >Add ECCode CSV</a>


    </form>
    </body>
</html>

<%--<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim o As New System.Collections.Specialized.NameValueCollection
        If Request.QueryString("e") IsNot Nothing Then
            o.Add("EnrNo", Request.QueryString("e"))
        Else
            o.Add("EnrNo", "063072609")
        End If
        
        o.Add("Submit", "Submit")
        o.Add("program", "MCA")

        Dim r = GetRequest("http://admission.ignou.ac.in/changeadmdata/ADDRESSSTATUS.ASP", o)

        Dim resp = r.GetResponse.GetResponseStream
        Dim reader As New System.IO.StreamReader(resp)
        Dim t = reader.ReadToEnd
        Dim p = Server.MapPath("~/123.txt")
        My.Computer.FileSystem.WriteAllText(p, t, True)
        Response.Write(t)
        
    End Sub

    Private Function GetRequest(ByVal url As [String], ByVal nameValueCollection As Specialized.NameValueCollection) As HttpWebRequest
        ' Here we convert the nameValueCollection to POST data.
        ' This will only work if nameValueCollection contains some items.
        Dim parameters = New StringBuilder()

        For Each key In nameValueCollection
            parameters.AppendFormat("{0}={1}&", HttpUtility.UrlEncode(key), HttpUtility.UrlEncode(nameValueCollection(key)))
        Next

        parameters.Length -= 1

        ' Here we create the request and write the POST data to it.
        Dim request = DirectCast(HttpWebRequest.Create(url), HttpWebRequest)
        request.ContentType = "application/x-www-form-urlencoded"
        request.Method = "POST"
        request.AutomaticDecompression = System.Net.DecompressionMethods.GZip
        request.Proxy = New System.Net.WebProxy("119.82.113.131", 3128)
        'Accept-Encoding: gzip,deflate
        Using writer = New StreamWriter(request.GetRequestStream())
            writer.Write(parameters.ToString())
        End Using

        Return request
    End Function

    </script>--%>